<div class="module-cash">
    <ol class="breadcrumb fn-clearfix">
        <li>散户管理</li>
        <li>USD</li>
        <li>Deposit 充值申请</li>
    </ol>
    <uib-tabset active="activeForm">
        <uib-tab index="0" heading="OKPay">
            <div class="module-oppay">
                <div class="panel panel-warning">
                    <div class="panel-body">
                        <form class="form-inline ui-form" role="form">
                            <div class="form-group">
                                <select  class="form-control" ng-model="vm.cashInCondition.status" ng-change="vm.fetchList()">
                                    <option value="WAIT">进行中</option>
                                    <option value="SUCCESS">已完成</option>
                                    <option value="FAILURE">已取消</option>
                                    <option value="" selected>全部状态</option>
                                </select>
                            </div>
                            <div class="form-group ui-input-select">
                                <input type="text"
                                       class="form-control"
                                       ng-model="vm.keyWordText"
                                       style="width: 300px;"
                                       placeholder="按类别搜索信息">
                                <select class="form-control" ng-model="vm.keyWord" ng-change="vm.changeKey()">
                                    <option value="id">ID</option>
                                    <option value="uId">UID</option>
                                    <option value="account">账号</option>
                                    <option value="orderNo">订单号</option>
                                </select>
                                <button type="submit"  class="btn btn-primary" ng-click="vm.fetchList()">搜索</button>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="ui-box">
                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th width="15%">创建时间</th>
                            <th width="5%">ID</th>
                            <th width="5%">UID</th>
                            <th width="12%">姓名</th>
                            <th width="23%">订单号</th>
                            <th width="12%">申请充值金额($)</th>
                            <th width="12%">实付到账金额($)</th>
                            <th width="8%">状态</th>
                            <th width="8%">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
                            <td>{{$root.moment(item.createDate).utc().utcOffset($root.ZONE).format('YYYY-MM-DD HH:mm:ss')}}</td>
                            <td>{{item.id}}</td>
                            <td ng-click="vm.searchInfo(item.uid)"><a href="javascript:void(0)">{{item.uid}}</a></td>
                            <td>{{item.name}}</td>
                            <td>{{item.orderNo}}</td>
                            <td>{{item.applyAmount}}</td>
                            <td>{{item.realAmount}}</td>
                            <td ng-class="{orangetradedetail:(item.status=='WAIT'),greentradedetail:(item.status=='SUCCESS'),graytradedetail:(item.status=='CANCEL')}" >
                                {{item.status | cashInStatus}}
                            </td>
                            <td>
                                <a ng-if="!(item.status=='SUCCESS'||item.status=='CANCEL'||item.status=='FAILURE')"
                                   href="javascript:;"
                                   ng-click="vm.confirmTransfer(item.id)">到账</a>
                            </td>
                        </tr>
                        <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
                            <td colspan="9">暂无数据</td>
                        </tr>
                        <tr class="ui-loading" ng-if="vm.isLoading === true">
                            <td colspan="9">正在加载，请稍候...</td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="ui-pager-box" v-if="vm.totalNum > 0">
                        <ul uib-pagination
                            previous-text="上一页"
                            next-text="下一页"
                            first-text="首页"
                            last-text="尾页"
                            total-items="vm.totalNum"
                            ng-model="vm.cashInCondition.pageNo"
                            max-size="5"
                            items-per-page="vm.pageSize || 10"
                            align="right"
                            class="pagination"
                            boundary-links="true"
                            ng-change="vm.pageChanged()"
                            rotate="false"></ul>
                    </div>
                </div>
            </div>
        </uib-tab>
    </uib-tabset>
</div>
